<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    .bg{
        width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    canvas{
        background-image: linear-gradient(20deg, #FF1C26, #fff);
        transform: rotate(0deg);
        flex-grow: 1;
        /* animation: roto 20s linear infinite; */
    }
    @keyframes roto {
        to{
            transform: rotate(360deg);
        }
    }
    </style>
</head>
<body>
    <div class="bg">
        <canvas id="app"></canvas>
        <canvas id="app"></canvas>
    </div>
    
    <script>
        // var canvas = document.getElementById('app');
        // console.log('canvas:', canvas);
        // var ctx = canvas.getContext('2d');
        // console.log('ctx:', ctx);
        // // ctx.fillstyle = 'rgb(200,0,0)'
        // // ctx.fillRect (10, 10, 55, 50);

        // // ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
        // // ctx.fillRect (30, 30, 55, 50);

        // // ctx.fillStyle = "rgba(0, 200, 0, 0.5)";
        // // ctx.fillRect (50, 50, 55, 50);

        // function draw(){
        //     ctx.fillRect(0,110,100,100) // 绘制一个填充的矩形
        //     ctx.strokeRect(0,0,100,100) // 绘制一个矩形的边框
        //     ctx.fillRect(110,0,100,100)
        //     ctx.strokeRect(110,110,100,100)
        //     ctx.clearRect(120, 10, 50, 25);
        // }
        // draw()
    </script>

</body>
</html>